<?php
class Index extends Action {
	/*
	 * (non-PHPdoc) @see Action::execute()
	 */
	public function execute($params) {
		$ajaxCmd = rqst ( 'ajaxCmd' );
		if (empty ( $ajaxCmd )) {
			return new JsonView ( array ('success' => false, 'msg' => 'the ajaxCmd is null!' ) );
		}
		if (! has_hook ( 'ajax_' . $ajaxCmd )) {
			return new JsonView ( array ('success' => false, 'msg' => 'the hook ajax_' . $ajaxCmd . ' for ajaxCmd is not  register!' ) );
		}
		$data = apply_filter ( 'ajax_' . $ajaxCmd, array () );
		return new JsonView ( $data );
	}
}